home *** CD-ROM | disk | FTP | other *** search
- To the one known as Jamie,
-
- > Okay, I'm not going to brag on about anything... All I want to know
- > is how to use normaly inputs and take "BITS" from it, and make it
- > NON case sensative...
- > So if I took say this:
- > Eat the cow
- > And the cow didn't exist, it should say:
- > There is no cow to eat.
- > I don't know ho to do that normally...
- > Also: Case sensetive etc:
- > I want this:
- > HELLO
- > To be the same as this:
- > HeLlO
-
- Case sensitive is the easy bit, use Upper$ to convert it to upper case for
- manageability, then split them into different words. Now things get really
- difficult. EAT & COW is fairly straight forward, but you need to take into
- account all your objects that are edible, and all the command words you are
- using, related to other command words and objects, so each thing relates to
- another thing, so to EAT your COW, you would probably need a FORK or a
- DEAD-COW.
-
- There are two main ways of working out EAT the COW, one is extensive
- programming on a per-location basis, and the other is with huge databases,
- but to start you off, here is some code to split up your input.
-
- dim split$(10):rem 10 words max.
- line input a$ :rem nasty input.
- a$=upper$(a$)
- c=1
- for n=1 to len(a$)
- z$=mid$(a$,n,1)
- if z$=" "
- c=c+1
- else
- split$(c)=split$(c)+z$
- end if
- next
-
- (end of code)
-
- split$(1)="EAT"
- split$(2)="THE"
- split$(3)="COW"
-
- ..let me know if you need more help/code.
-
- _ _ _ _ _ _ |
- |_> |_| |_| |\ | |_ | | | / | | "Would you like a Jellybaby ?"
- |_> | \ | | | \| |_ |_ |_| \_ . | - The Doctor
- |
- --------------+---------------
- http://www.mirex.demon.co.uk
-
-